home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20030409-20031118
/
000309_fdc@columbia.edu_Fri Sep 26 12:21:09 EDT 2003.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
2KB
|
45 lines
Article: 14553 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news-not-for-mail
From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: How to use fopen
Date: 26 Sep 2003 12:21:05 -0400
Organization: Columbia University
Lines: 27
Message-ID: <bl1p1h$e5p$1@sesame.cc.columbia.edu>
References: <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com> <bl1hjq$s8o$1@sesame.cc.columbia.edu> <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1064593265 7691 128.59.59.56 (26 Sep 2003 16:21:05 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 26 Sep 2003 16:21:05 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14553
In article <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>,
Jun Zhang <nugulus@netscape.net> wrote:
: fopen /read \%c inputfile
: fread \%c a
:
: so that each element of the array will be a field of a line in
: inputfile. Suppose a line in the inputfile is like,
: 5122785633 root rootpass
: I'll have a[2] with the value 'rootpass'.
: Please correct me.
:
This is not something that FREAD does. Instead you would read a line,
and then assign its fields to an array with \fsplit():
http://www.columbia.edu/kermit/ckermit70.html#x7.3
http://www.columbia.edu/kermit/ckermit80.html#x8.7.2
Read both of these references; significant improvements were made to
\fsplit() in C-Kermit 8.0.
Example:
fread /line \%c record
if fail ...
void \fsplit(\m(record),&a)
- Frank